package com.kma.summer2012.client.events.authorization;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

/**
 * Created by IntelliJ IDEA.
 * User: Администратор
 * Date: 23.01.13
 * Time: 10:57
 * To change this template use File | Settings | File Templates.
 */
public class LogoutEvent extends GwtEvent<LogoutEvent.LogoutEventHandler> {
    private static Type<LogoutEventHandler> TYPE = new Type<LogoutEventHandler>();

    public interface LogoutEventHandler extends EventHandler {
        void onLogout();
    }

    @Override
    public Type<LogoutEventHandler> getAssociatedType() {
        return TYPE;
    }

    public static Type<LogoutEventHandler> getType() {
        return TYPE;
    }

    @Override
    protected void dispatch(LogoutEventHandler handler) {
        handler.onLogout();
    }
}
